Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to #28595 - Use partial updates for JSON #28844

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Aug 23, 2022

Currently, whenever we update/add/delete part of aggregate mapped to JSON column, we were replacing the entire structure.
Improvement is to use JSON_MODIFY which can alter just a portion of JSON structure, give a JSON path.
We analyze the entries that are being edited and for each JSON column we find the common denominator that needs to be replaced to accommodate all the requested changes

Note: Whenever we add/remove element from a collection we need to replace the entire collection in order to populate ordinal key values properly.
Also, modifying a single property is not yet supported - the smallest fragment that will be replaced is one that represents an entity.

Fixes #28595

@maumar maumar force-pushed the json_partial_update_final branch 2 times, most recently from b572234 to e18cade Compare August 23, 2022 07:11
@maumar maumar requested a review from dougbu as a code owner August 23, 2022 19:39
@maumar maumar changed the base branch from release/7.0 to release/7.0-rc1 August 23, 2022 19:39
@maumar maumar removed the request for review from dougbu August 23, 2022 19:40
Currently, whenever we update/add/delete part of aggregate mapped to JSON column, we were replacing the entire structure.
Improvement is to use JSON_MODIFY which can alter just a portion of JSON structure, give a JSON path.
We analyze the entries that are being edited and for each JSON column we find the common denominator that needs to be replaced to accommodate all the requested changes

Note: Whenever we add/remove element from a collection we need to replace the entire collection in order to populate ordinal key values properly.
Also, modifying a single property is not yet supported - the smallest fragment that will be replaced is one that represents an entity.

Fixes #28595
@maumar maumar merged commit bbde5fe into release/7.0-rc1 Aug 24, 2022
@maumar maumar deleted the json_partial_update_final branch August 24, 2022 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use partial updates for JSON
3 participants